package com.note.simpleshop.module.goods.vo;

import com.note.simpleshop.entity.TbGoodsSpec;

import java.io.Serializable;
import java.math.BigDecimal;

public class GoodsSpecVo implements Serializable {
    private String id;
    private String name;
    private Integer hot;
    private Double discount;
    private Integer stock;
    private BigDecimal costPrice;
    private String goodsId;
    private Integer stockWarning;
    private BigDecimal salePrice;
    private BigDecimal marketPrice;
    private Integer saleNum;
    private Integer surplusNum;

    public BigDecimal getSalePrice() {
        return salePrice;
    }

    public void setSalePrice(BigDecimal salePrice) {
        this.salePrice = salePrice;
    }

    public BigDecimal getMarketPrice() {
        return marketPrice;
    }

    public void setMarketPrice(BigDecimal marketPrice) {
        this.marketPrice = marketPrice;
    }

    public Integer getSaleNum() {
        return saleNum;
    }

    public void setSaleNum(Integer saleNum) {
        this.saleNum = saleNum;
    }

    public Integer getSurplusNum() {
        return surplusNum;
    }

    public void setSurplusNum(Integer surplusNum) {
        this.surplusNum = surplusNum;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String specs) {
        this.name = specs;
    }


    public Integer getHot() {
        return hot;
    }

    public void setHot(Integer hot) {
        this.hot = hot;
    }

    public Double getDiscount() {
        return discount;
    }

    public void setDiscount(Double discount) {
        this.discount = discount;
    }

    public Integer getStock() {
        return stock;
    }

    public void setStock(Integer stock) {
        this.stock = stock;
    }

    public BigDecimal getCostPrice() {
        return costPrice;
    }

    public void setCostPrice(BigDecimal costPrice) {
        this.costPrice = costPrice;
    }

    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getStockWarning() {
        return stockWarning;
    }

    public void setStockWarning(Integer stockWarning) {
        this.stockWarning = stockWarning;
    }

    public static GoodsSpecVo newInstance(TbGoodsSpec goodsSpec)
    {
        GoodsSpecVo vo=new GoodsSpecVo();
        vo.id=goodsSpec.getId();
        vo.name=goodsSpec.getName();
        vo.hot=goodsSpec.getHot();
        vo.discount=goodsSpec.getDiscount();
        vo.stock=goodsSpec.getStock();
        vo.costPrice=goodsSpec.getCostPrice();
        vo.goodsId=goodsSpec.getGoodsId();
        vo.stockWarning=goodsSpec.getStockWarning();
        vo.salePrice=goodsSpec.getSalePrice();
        vo.marketPrice=goodsSpec.getMarketPrice();
        vo.saleNum=goodsSpec.getSaleNum();
        vo.surplusNum=goodsSpec.getSurplusNum();
        return vo;
    }
}
